export function generateMultiplicationCommutativeAssociative(difficulty: 1 | 2 = 1): {
  content: string;
  solution: string;
  difficulty: number;
  knowledge_code: string;
  question_type: string;
} {
  // 难度1: 两个数交换或三个数简单结合
  // 难度2: 三个数以上复杂结合或包含零
  
  if (difficulty === 1) {
    const a = Math.floor(Math.random() * 10) + 2;
    const b = Math.floor(Math.random() * 10) + 2;
    const c = Math.floor(Math.random() * 10) + 2;
    return {
      content: `${a}×${b}×${c}`,
      solution: `${a}×${b}×${c} = ${a}×(${b}×${c}) = ${a}×${b*c} = ${a*b*c}`,
      difficulty,
      knowledge_code: '3.2.1_chengfa-jiaohuanlü-jiehelü',
      question_type: 'fill_in_blank'
    };
  } else {
    const a = Math.floor(Math.random() * 20) + 5;
    const b = Math.floor(Math.random() * 20) + 5;
    const c = Math.floor(Math.random() * 20) + 5;
    const d = Math.floor(Math.random() * 20) + 5;
    return {
      content: `${a}×${b}×${c}×${d}`,
      solution: `${a}×${b}×${c}×${d} = (${a}×${c})×(${b}×${d}) = ${a*c}×${b*d} = ${a*b*c*d}`,
      difficulty,
      knowledge_code: '3.2.1_chengfa-jiaohuanlü-jiehelü',
      question_type: 'fill_in_blank'
    };
  }
}